Write Performance In Solid State Storage by Recognizing Copy Source to Target Operations and Only Storing Updates Instead of Entire Block

ABSTRACT

A mechanism is provided in a data processing system for accessing a solid state drive. Responsive to receiving request to write an update to a block of data in the solid state drive with an update option set, the mechanism reads the block of data from the solid state drive. The mechanism determines a difference between the update and the block of data. The mechanism compresses the difference to form an update record. The mechanism stores the update record and modifies metadata of the block of data to reference the update record.

BACKGROUND

The present application relates generally to an improved data processingapparatus and method and more specifically to mechanisms for improvingwrite performance in solid state storage by recognizing copy source totarget operations and only storing updates instead of entire blocks.

A solid-state drive (SSD) is a data storage device that uses solid-statememory to store persistent data with the intention of providing accessin the same manner of a traditional block I/O hard disk drive. SSDs aredistinguished from traditional hard disk drives (HDDs), which areelectromechanical devices containing spinning disks and movableread/write heads. SSDs, in contrast, use microchips which retain data innon-volatile memory chips and contain no moving parts. Compared toelectromechanical HDDs, SSDs are typically less susceptible to physicalshock, are quieter, and have lower access time and latency. SSDs use thesame interface as hard disk drives, thus easily replacing them in mostapplications.

SSDs are starting to revolutionize the data center as heretofore unheardof levels of performance are now possible. Servers can bring in moredata, and the input/output (IO) bottleneck is not as large it once was.Storage systems are also starting to use SSDs as tiers of storagealongside HDDs. In some cases, pure SSD configurations are starting tobe used. Because SSDs hold vital client data, it is important that thedrives still have some sort of disaster recovery solution applied tothem like flash copy or peer-to-peer remote copy or both.

SUMMARY

In one illustrative embodiment, a method, in a data processing system,is provided for accessing a solid state drive. The method comprisesresponsive to receiving request to write an update to a block of data inthe solid state drive with an update option set, reading the block ofdata from the solid state drive. The method further comprisesdetermining a difference between the update and the block of data. Themethod further comprises compressing the difference to form an updaterecord. The method further comprises storing the update record andmodifying metadata of the block of data to reference the update record.

In other illustrative embodiments, a computer program product comprisinga computer useable or readable medium having a computer readable programis provided. The computer readable program, when executed on a computingdevice, causes the computing device to perform various ones of, andcombinations of, the operations outlined above with regard to the methodillustrative embodiment.

In yet another illustrative embodiment, a system/apparatus is provided.The system/apparatus may comprise one or more processors and a memorycoupled to the one or more processors. The memory may compriseinstructions which, when executed by the one or more processors, causethe one or more processors to perform various ones of, and combinationsof, the operations outlined above with regard to the method illustrativeembodiment.

These and other features and advantages of the present invention will bedescribed in, or will become apparent to those of ordinary skill in theart in view of, the following detailed description of the exampleembodiments of the present invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The invention, as well as a preferred mode of use and further objectivesand advantages thereof, will best be understood by reference to thefollowing detailed description of illustrative embodiments when read inconjunction with the accompanying drawings, wherein:

FIG. 1 depicts a pictorial representation of an example distributed dataprocessing system in which aspects of the illustrative embodiments maybe implemented;

FIG. 2 is a block diagram of an example data processing system in whichaspects of the illustrative embodiments may be implemented;

FIG. 3 is a block diagram depicting an example storage system inaccordance with an illustrative embodiment;

FIG. 4 is a block diagram illustrating the operation of performing awrite to a storage device in accordance with an illustrative embodiment;

FIG. 5 is a block diagram illustrating the operation of performing aread from a storage device in accordance with an illustrativeembodiment;

FIG. 6 is a flowchart illustrating operation of a mechanism forperforming a write to a storage device in accordance with anillustrative embodiment;

FIG. 7 is a flowchart illustrating operation of a mechanism forperforming a write to a storage device in accordance with anillustrative embodiment; and

FIG. 8 is a flowchart illustrating operation of a mechanism forperforming garbage collection of a storage device in accordance with anillustrative embodiment.

DETAILED DESCRIPTION

The illustrative embodiments may be utilized in many different types ofdata processing environments including a distributed data processingenvironment, a single data processing device, or the like. In order toprovide a context for the description of the specific elements andfunctionality of the illustrative embodiments, FIGS. 1-3 are providedhereafter as example environments in which aspects of the illustrativeembodiments may be implemented. While the description following FIGS.1-3 will focus primarily on a single data processing deviceimplementation, this is only an example and is not intended to state orimply any limitation with regard to the features of the presentinvention.

With reference now to the figures and in particular with reference toFIGS. 1-3, example diagrams of data processing environments are providedin which illustrative embodiments of the present invention may beimplemented. It should be appreciated that FIGS. 1-3 are only examplesand are not intended to assert or imply any limitation with regard tothe environments in which aspects or embodiments of the presentinvention may be implemented. Many modifications to the depictedenvironments may be made without departing from the spirit and scope ofthe present invention.

FIG. 1 depicts a pictorial representation of an example distributed dataprocessing system in which aspects of the illustrative embodiments maybe implemented. Distributed data processing system 100 may include anetwork of computers, communication fabrics, and storage systems inwhich aspects of the illustrative embodiments may be implemented. Thedistributed data processing system 100 contains at least one network102, which is the medium used to provide communication links betweenvarious devices and computers connected together within distributed dataprocessing system 100. The network 102 may include connections, such aswire, wireless communication links, or fiber optic cables.

In the depicted example, server 104 and server 106 are connected tonetwork 102. Server 104 is also connected to storage system 134 viafabric 124, and server 106 is connected to storage system 136 via fabric126. In addition, clients 110, 112, and 114 are also connected tonetwork 102. These clients 110, 112, and 114 may be, for example,personal computers, network computers, or the like. In the depictedexample, server 104 may provide data, such as boot files, operatingsystem images, and applications to the clients 110, 112, and 114.Clients 110, 112, and 114 are clients to server 104 in the depictedexample. Distributed data processing system 100 may include additionalservers, clients, and other devices not shown.

In the depicted example, distributed data processing system 100 is theInternet with network 102 representing a worldwide collection ofnetworks and gateways that use the Transmission ControlProtocol/Internet Protocol (TCP/IP) suite of protocols to communicatewith one another. At the heart of the Internet is a backbone ofhigh-speed data communication lines between major nodes or hostcomputers, consisting of thousands of commercial, governmental,educational and other computer systems that route data and messages. Ofcourse, the distributed data processing system 100 may also beimplemented to include a number of different types of networks, such asfor example, an intranet, a local area network (LAN), a wide areanetwork (WAN), or the like. As stated above, FIG. 1 is intended as anexample, not as an architectural limitation for different embodiments ofthe present invention, and therefore, the particular elements shown inFIG. 1 should not be considered limiting with regard to the environmentsin which the illustrative embodiments of the present invention may beimplemented.

Fabrics 124, 126 may be any communications fabric that supports I/Otraffic between a host and a storage system. For example, fabrics 124,126 may be Fibre Channel, serial attached SCSI, Ethernet, or the like,and may include switches or routers to support I/O communication.Fabrics 124, 126 may also support connection to network 102. Forexample, server 106 may access storage system 134 via network 102 andfabric 124 without intervention of server 104. Similarly, server 104 mayaccess storage system 136 without intervention of server 106.

In accordance with an illustrative embodiment, distributed dataprocessing system 100 provides a dual remote copy configuration fordisaster recovery. That is, when server 104 performs a write operationto storage system 134, the write operation is also performed at storagesystem 136. The dual remote copy may be performed by the host, such asserver 104, or by the storage system itself, such as storage system 134.For example, server 104 may write data to storage system 134 and havethe data copied to storage system 136 such that if storage system 134were to fail, server 104 may then read the data from storage system 136.

Storage system 136 may be placed at a remote location from storagesystem 134, perhaps on a different continent. Thus, if there was adisaster, such as a fire or the like, and storage system 134 wasdestroyed, the data would be safe at storage system 136, and storagesystem 134 could be recreated using the data at storage system 136.

Storage systems 134, 136 may use solid-state drives (SSDs), either aloneor alongside hard disk drives (HDDs), in a tiered storage configuration.A very common storage operation involves doing point-in-time copies toensure data is not lost due to an unexpected event like a catastrophicequipment failure, software bug, or natural disaster. Such copiesinvolve doing a background copy of all the data in the volume, logicalunit (LUN), dataset, or data from the source to the target.

Additionally, any update to the source while the copy is being done butbefore it could be copied via background copy would result in a certainpart of the data being updated with the host write and then being copiedover to the target. The minimum update size of the data is a function ofhow much metadata the system can handle. For example, the system may bebroken into 64K “tracks” or 56K “tracks.” If the host updates a 4K“page” inside the 64K track, then the copy source to target functionwill read 64K off the source, update 4K, and then write the 64K to thetarget In such a scenario, very little of the data actually changed.

For hard disk drives (HDDs), there is no problem with copy source totarget operations, because HDDs can do unlimited writes. However, withsolid state drives (SSDs), write performance is limited, as is writeendurance. If the target already existed above and only 4K changed, thenthat means an additional 60K are written needlessly. This is a writeamplification of 16. In addition, because the write cache is relativelysmall on an SSD, a large portion would be taken up by data that alreadyexists.

There are SSDs today that compress data coming in, but that usuallygives only a 2× to 3× reduction. That would reduce the writeamplification to 5× to 8× if the data is compressible.

In accordance with the illustrative embodiments, a mechanism is providedto perform flash copy functions that write a certain size block over tothe target whenever the source has an update to even a small part of theblock. The mechanism keeps metadata on what has changed manageable.Therefore, only a small part of the block changes. The mechanism of theillustrative embodiments has the SSD perform a read to the old block, doan XOR compare, and compress the result, which has the effect ofextracting the delta. The mechanism of the illustrative embodimentsstores these differences and eventually merges them, for example duringa garbage collection operation.

FIG. 2 is a block diagram of an example data processing system in whichaspects of the illustrative embodiments may be implemented. Dataprocessing system 200 is an example of a computer, such as client 110 orserver 104 in FIG. 1, in which computer usable code or instructionsimplementing the processes for illustrative embodiments of the presentinvention may be located.

In the depicted example, data processing system 200 employs a hubarchitecture including north bridge and memory controller hub (NB/MCH)202 and south bridge and input/output (I/O) controller hub (SB/ICH) 204.Processing unit 206, main memory 208, and graphics processor 210 areconnected to NB/MCH 202. Graphics processor 210 may be connected toNB/MCH 202 through an accelerated graphics port (AGP).

In the depicted example, local area network (LAN) adapter 212 connectsto SB/ICH 204. Audio adapter 216, keyboard and mouse adapter 220, modem222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive230, universal serial bus (USB) ports and other communication ports 232,and PCI/PCIe devices 234 connect to SB/ICH 204 through bus 238 and bus240. PCI/PCIe devices may include, for example, Ethernet adapters,add-in cards, and PC cards for notebook computers. PCI uses a card buscontroller, while PCIe does not. ROM 224 may be, for example, a flashbasic input/output system (BIOS).

HDD 226 and CD-ROM drive 230 connect to SB/ICH 204 through bus 240. HDD226 and CD-ROM drive 230 may use, for example, an integrated driveelectronics (IDE) or serial advanced technology attachment (SATA)interface. Super I/O (SIO) device 236 may be connected to SB/ICH 204.

An operating system runs on processing unit 206. The operating systemcoordinates and provides control of various components within the dataprocessing system 200 in FIG. 2. As a client, the operating system maybe a commercially available operating system such as Microsoft® Windows®XP (Microsoft and Windows are trademarks of Microsoft Corporation in theUnited States, other countries, or both). An object-oriented programmingsystem, such as the Java™ programming system, may run in conjunctionwith the operating system and provides calls to the operating systemfrom Java™ programs or applications executing on data processing system200 (Java is a trademark of Sun Microsystems, Inc. in the United States,other countries, or both).

As a server, data processing system 200 may be, for example, an IBM®eServer™ System p® computer system, running the Advanced interactiveExecutive (AIX®) operating system or the LINUX® operating system(eServer, System p, and AIX are trademarks of International BusinessMachines Corporation in the United States, other countries, or bothwhile LINUX is a trademark of Linus Torvalds in the United States, othercountries, or both). Data processing system 200 may be a symmetricmultiprocessor (SMP) system including a plurality of processors inprocessing unit 206. Alternatively, a single processor system may beemployed.

Instructions for the operating system, the object-oriented programmingsystem, and applications or programs are located on storage devices,such as HDD 226, and may be loaded into main memory 208 for execution byprocessing unit 206. The processes for illustrative embodiments of thepresent invention may be performed by processing unit 206 using computerusable program code, which may be located in a memory such as, forexample, main memory 208, ROM 224, or in one or more peripheral devices226 and 230, for example.

A bus system, such as bus 238 or bus 240 as shown in FIG. 2, may becomprised of one or more buses. Of course, the bus system may beimplemented using any type of communication fabric or architecture thatprovides for a transfer of data between different components or devicesattached to the fabric or architecture. A communication unit, such asmodem 222 or network adapter 212 of FIG. 2, may include one or moredevices used to transmit and receive data. A memory may be, for example,main memory 208, ROM 224, or a cache such as found in NB/MCH 202 in FIG.2.

FIG. 3 is a block diagram depicting an example storage system inaccordance with an illustrative embodiment. Storage enclosure 300, whichmay be storage system 134 or storage system 136 in FIG. 1, for example,is comprised of storage controller 302, which may be a redundant arrayof independent disks (RAID) controller or a non-RAID controller. Storagecontroller 302 communicates storage devices 312, 314, 316, and 318through switch 304. Switch 304 may be, for example, a serial attachedSCSI (SAS) switch. Other devices in a storage area network (SAN) maywrite data to or read data from storage enclosure 300 by connection toswitch 304 via I/O interface 306. Storage controller 302 may be aprocessor operating under control of instructions stored in a memory(not shown).

In the depicted example, storage devices 312, 314, 316, and 318 includesolid-state drives (SSDs) 312, 314 and hard disk drives (HDDs) 316, 318.SSDs 312, 314 may be used alongside HDDs 316, 318 in a tiered storageconfiguration.

Those of ordinary skill in the art will appreciate that the hardware inFIGS. 1-3 may vary depending on the implementation. Other internalhardware or peripheral devices, such as flash memory, equivalentnon-volatile memory, or optical disk drives and the like, may be used inaddition to or in place of the hardware depicted in FIGS. 1-3. Also, theprocesses of the illustrative embodiments may be applied to amultiprocessor data processing system, other than the SMP systemmentioned previously, without departing from the spirit an scope of thepresent invention.

FIG. 4 is a block diagram illustrating the operation of performing awrite to a storage device in accordance with an illustrative embodiment.The illustrative embodiments may provide anew small computer systeminterface (SCSI) command, a new bit in the SCSI command block, an optionto simply do the new function on logical block address (LBA) ranges orwrite commands, which are greater than a certain size, such as 56K. Whena storage device, such as a solid state drive (SSD), detects a writewith the option set as above then it will read the previous LBA range,if it exists, and then XOR the old data with the data written by thehost.

The processor 400 of the storage controller or solid state drivereceives a write operation 402 from an initiator, e.g., a host. If thewrite operation 402 has the update option set and the LBA range existsin SSD storage 410, processor 400 reads the old data from SSD storage410 and performs an XOR operation 404 on the write data from the writeoperation 402 and the old data from SSD storage 410. Processor 400performs a compress operation 406 on the result of the XOR operation 404to generate an update record. The compression operation 406 may use aknown compression algorithm, such as the GNU Project's GNUP Zip (GZIP),LZI, etc. Processor 400 then stores the update record in SSD storage410.

The illustrative embodiment enhances the directory map 412 for the dataelement in the SSD 410 to signify that one or more update elementsexist. A new form of invalidation is described. Normally, a chunk in anSSD is invalidated when an update write occurs and the update is thenwritten somewhere else and the directory map 412 is changed. In thiscase, the data element is augmented with one or more update records thatmust be merged with the old data to form the new data. The directory map412 describes where the update records are stored. Update records may bestored in the SSD or in memory. The directory map may be stored in theSSD or memory.

While there is in theory no limit to how many update records can exist,in practice, reads to flash are not trivial. Therefore, the system maylimit the number of update records for an LBA range to a predeterminednumber, such as one or two or three. In this way, once processor 400does the (n+1)^(th) update, the processor may merge the old data withall existing update records and write the entire data element to SSDstorage 410 while invalidating the old data and the update records.Processor 400 may then update directory map 412 to point to the new dataelement.

The illustrative embodiments may provide a mechanism for a new type ofgarbage collection. The number of update records may begin to grow. Themechanism may determine whether the total number of update recordsexceeds a predetermined threshold. In response to the number of updaterecords exceeding the threshold, the mechanism may perform merges ofcertain records in order to reclaim space. For example, the mechanismmay merge the oldest update records. Alternatively, the mechanism mayselect update records for the most frequently used LBA ranges to bemerged to reclaim space. Other criteria for selecting update records tomerge may be used depending upon the implementation.

FIG. 5 is a block diagram illustrating the operation of performing aread from a storage device in accordance with an illustrativeembodiment. The processor 500 of the storage controller or solid statedrive receives a read operation 502 from an initiator, e.g., a host. Theprocessor looks up the LBA range of the read operation in directory map512, which points to where the data element is stored in SSD storage 510and identifies whether update records exist for the data element.Processor 500 reads the old data and a first update record from SSDstorage 510. Processor 500 performs decompression operation 506 on theold data, if the old data is compressed, and performs decompressionoperation 508 on the update record. Processor 500 performs XOR operation504 on the decompressed old data and the decompressed update record. Ifthe update record is not the last update record for the data element,processor 500 reads the next update record from SSD storage 510,performs decompression operation 508 on the update record, and performsXOR operation 504 on the previous result and the decompressed updaterecord. If there are no more update records, processor 500 returns theresult of XOR operation 504 to the initiator as read data 522.

The read operation of the illustrative embodiment can increase thelatency of reads. However, flash copy operations are rarely read. Thepenalty to do the merge is small compared to the increased performanceof writes.

The embodiments of the illustrative embodiments may be used onbackground copies if the amount of data updated is relatively small. Infact, the processor may use a threshold to determine whether the size ofthe update is greater than a predetermined percentage of the originaldata. If the size of the update is greater than the predeterminedpercentage, the processor may invalidate the original and write the newdata. If the size of the update is less than the predeterminedpercentage, the processor may create an update record.

As will be appreciated by one skilled in the art, the present inventionmay be embodied as a system, method, or computer program product.Accordingly, aspects of the present invention may take the form of anentirely hardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module,” or “system.” Furthermore,aspects of the present invention may take the form of a computer programproduct embodied in any one or more computer readable medium(s) havingcomputer usable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CDROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, in abaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Computer code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,optical fiber cable, radio frequency (RF), etc., or any suitablecombination thereof.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java™, Smalltalk™, C++, or the like, and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer, or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to the illustrativeembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions thatimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

FIG. 6 is a flowchart illustrating operation of a mechanism forperforming a write to a storage device in accordance with anillustrative embodiment. Operation begins when the mechanism receives awrite operation from an initiator (block 600). The mechanism thendetermines whether the write operation has an update operation set(block 601). The mechanism may determine the write operation has anupdate operation set if a bit in the SCB is set or the write operationis a specialized command indicating the write is a small update to ablock of data. Alternatively, the mechanism may determine the writeoperation has an update operation set by comparing an amount of databeing updated to the original data element.

If the mechanism determines the write operation does not have an updateoption set, the mechanism writes the data to the storage device (block602) and updates the metadata to invalidate the old data, if any, andindicate that no update record exists (bock 603). Thereafter, operationends (block 604).

If the mechanism determines the write operation has an update option setblock 601, the mechanism determines whether the number of updates to thedata element is equal to a predetermined threshold, N (block 605). Ifthe number of update records is not equal to N, the mechanism reads theold data (block 606), performs an XOR operation on the old data and thewrite data (block 607), compresses the result to form an update record(block 608), and stores the update record (block 609). The mechanismthen updates the metadata to indicate the existence of the update record(block 610), and operation ends (block 604). If one or more updaterecords already exist for the data element, the mechanism may read theold data in block 606 and merge the existing update records prior togenerating the update record for the current write data.

If the number of updates is equal to N block 605, the mechanism readsthe original data (block 611), reads a first update record (block 612),decompresses the first update (block 613), and performs an XOR operationon the original data and the update (block 614). The mechanism thendetermines whether the update is the last update record stored for thedata element (block 615). If the update is the not the last updaterecord for the data element, the mechanism reads the next update record(block 616), and operation returns to block 613 to decompress the updaterecord and perform an XOR operation on the previous result and theupdate (block 614). The process repeats until the update is the lastpreviously stored update record for the data element in block 615.

If the update is the last previously stored update record for the dataelement in block 615, then the mechanism has generated the old data forthe current write operation. The mechanism then applies the currentwrite data to the data element (block 617), writes the data to thestorage device (block 618), and updates the metadata to invalidate theold data and the previous update records and to indicate there are noupdate records (block 619). Thereafter, operation ends (block 604).

FIG. 7 is a flowchart illustrating operation of a mechanism forperforming a write to a storage device in accordance with anillustrative embodiment. Operation begins when the mechanism receives aread operation from an initiator (block 700), and the mechanismdetermines whether updates exist for the data element being read (block701). If there are no update records for the data element, the mechanismreads the requested data from the storage device (block 702) and returnsthe data to the initiator (block 703). Thereafter, operation ends.

If there are update records for the data element in block 701, themechanism reads the old data (block 705), reads the first update record(block 706), decompresses the update (block 707), and performs an XORoperation on the old data and the update record (block 708). Themechanism then determines whether the update is the last update recordfor the data element (block 709). If the update is not the last update,the mechanism reads the next update record (block 710), and operationreturns to block 707 to decompress the update record and perform an XORoperation on the (previous result and the decompressed update data(block 708). If the update is the last update stored for the dataelement in block 709, the mechanism returns the result as read data(block 703), and operation ends (block 704).

FIG. 8 is a flowchart illustrating operation of a mechanism forperforming garbage collection of a storage device in accordance with anillustrative embodiment. Operation begins in block 800, and themechanism determines whether the number of update records exceeds athreshold, K (block 801). The threshold may be a predetermined number ofupdate records, a predetermined amount of storage, or a predeterminedpercentage of storage, for example. If the number of update records doesnot exceed the threshold, operation returns to block 801 until thenumber of update records does exceed the threshold.

If the number of update records exceeds the threshold, K, in block 801,the mechanism merges selected update records (block 802) and reclaimsthe space of the merged update records (block 803). Thereafter,operation returns to block 801 to determine whether the number of updaterecords exceeds the threshold. The mechanism may select update recordsto merge based on the oldest update records, the least frequently useddata elements, or another scheme for identifying update records ascandidates for garbage collection. The mechanism may merge the selectedupdate records by reading the data elements as described above withreference to FIG. 7, writing the resulting data element, andinvalidating the old data element and update records. The mechanism maythen reclaim the space taken by invalid data elements and updaterecords.

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

Thus, the illustrative embodiments provide mechanisms for performingflash copy functions that write a certain size block over to the targetwhenever the source has an update to even a small part of the block. Themechanism performs a read of the old block, does an XOR compare, andcompresses the result, which has the effect of extracting the delta. Themechanism then stores these differences and eventually merges them, forexample during a garbage collection operation.

As noted above, it should be appreciated that the illustrativeembodiments may take the form of an entirely hardware embodiment, anentirely software embodiment or an embodiment containing both hardwareand software elements. In one example embodiment, the mechanisms of theillustrative embodiments are implemented in software or program code,which includes but is not limited to firmware, resident software,microcode, etc.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers. Network adapters mayalso be coupled to the system to enable the data processing system tobecome coupled to other data processing systems or remote printers orstorage devices through intervening private or public networks. Moderns,cable modems and Ethernet cards are just a few of the currentlyavailable types of network adapters.

The description of the present invention has been presented for purposesof illustration and description, and is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the art. Theembodiment was chosen and described in order to best explain theprinciples of the invention, the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

What is claimed is:
 1. A computer program product comprising a computerreadable storage medium having a computer readable program storedtherein, wherein the computer readable program, when executed on acomputing device, causes the computing device to: responsive toreceiving a request to write an update to a block of data in the solidstate drive with an update option set, read the block of data from thesolid state drive; determine a difference between the update and theblock of data; compress the difference to form an update record; storethe update record; and modify metadata of the block of data to referencethe update record.
 2. The computer program product of claim 1, whereindetermining the difference between the update and the block of datacomprises performing an XOR operation on the update and the block ofdata read from the solid state drive.
 3. The computer program product ofclaim 1, wherein modifying the metadata of the block of data toreference the update record comprises invalidating the block of data inthe solid state drive.
 4. The computer program product of claim 1,wherein the computer readable program further causes the computingdevice to: responsive to receiving a subsequent request to write asubsequent update to the block of data with an update option set,determine whether a number of updates to the block of data reaches apredetermined threshold; and responsive to the number of updates to theblock of data reaching the predetermined threshold, merge previousupdate records with the block of data to form an updated block of data,apply the subsequent update to the block of data to form a new block ofdata, invalidate the block of data, and write the new block of data tothe solid state drive.
 5. The computer program product of claim 4,wherein the computer readable program further causes the computingdevice to: modify the metadata of the block of data to point to the newblock of data.
 6. The computer program product of claim 4, wherein thecomputer readable program further causes the computing device to:responsive to the number of updates to the block of data not reachingthe predetermined threshold, merge previous update records with theblock of data to form an updated block of data, determine a differencebetween the update and the updated block of data, compress thedifference between the update and the updated block of data to form asubsequent update record, store the subsequent update record, and modifymetadata of the block of data to reference the subsequent update record.7. The computer program product of claim 1, wherein the computerreadable program further causes the computing device to: responsive toreceiving request to read the block of data in the solid state drivewith an update option set, read the block of data from the solid statedrive; merge the update record with the block of data to form an updatedblock of data; and return the updated block of data.
 8. The computerprogram product of claim 1, wherein the computer readable programfurther causes the computing device to: responsive to initiation of agarbage collection operation, select one or more update records forgarbage collection; merge the one or more update records with one ormore blocks of data in the solid state drive to form one or more mergedblocks of data; invalidate the one or more update records and the one ormore blocks of data; reclaim space of the one or more update records andthe one or more blocks of data; and write the one or more new blocks ofdata.
 9. The computer program product of claim 1, wherein the computerreadable program is stored in a computer readable storage medium in adata processing system and wherein the computer readable program wasdownloaded over a network from a remote data processing system.
 10. Thecomputer program product of claim 1, wherein the computer readableprogram is stored in a computer readable storage medium in a server dataprocessing system and wherein the computer readable program isdownloaded over a network to a remote data processing system for use ina computer readable storage medium with the remote system.
 11. Anapparatus, comprising: a processor; and a memory coupled to theprocessor, wherein the memory comprises instructions which, whenexecuted by the processor, cause the processor to: responsive toreceiving a request to write an update to a block of data in the solidstate drive with an update option set, read the block of data from thesolid state drive; determine a difference between the update and theblock of data; compress the difference to form an update record; storethe update record; and modify metadata of the block of data to referencethe update record.
 12. The apparatus of claim 11, wherein determiningthe difference between the update and the block of data comprisesperforming an XOR operation on the update and the block of data readfrom the solid state drive.
 13. The apparatus of claim 11, wherein theinstructions further cause the processor to: responsive to receiving asubsequent request to write a subsequent update to the block of datawith an update option set, determine whether a number of updates to theblock of data reaches a predetermined threshold; and responsive to thenumber of updates to the block of data reaching the predeterminedthreshold, merge previous update records with the block of data to forman updated block of data, apply the subsequent update to the block ofdata to form a new block of data, invalidate the block of data, andwrite the new block of data to the solid state drive.
 14. The apparatusof claim 12, wherein the instructions further cause the processor to:responsive to the number of updates to the block of data not reachingthe predetermined threshold, merge previous update records with theblock of data to form an updated block of data, determine a differencebetween the update and the updated block of data, compress thedifference between the update and the updated block of data to form asubsequent update record, store the subsequent update record, and modifymetadata of the block of data to reference the subsequent update record.15. The apparatus of claim 11, wherein the instructions further causethe processor to: responsive to receiving request to read the block ofdata in the solid state drive with an update option set, read the blockof data from the solid state drive; merge the update record with theblock of data to form an updated block of data; and return the updatedblock of data.
 16. A method, in a data processing system, for accessinga solid state drive, the method comprising: responsive to a receivingrequest to write an update to a block of data in the solid state drivewith an update option set, reading the block of data from the solidstate drive; determining a difference between the update and the blockof data; compressing, the difference to form an update record; storingthe update record; and modifying metadata of the block of data toreference the update record.
 17. The method of claim 16, whereindetermining the difference between the update and the block of datacomprises performing an XOR operation on the update and the block ofdata read from the solid state drive.
 18. The method of claim 16,further comprising: responsive to receiving a subsequent request towrite a subsequent update to the block of data with an update optionset, determining whether a number of updates to the block of datareaches a predetermined threshold; and responsive to the number ofupdates to the block of data reaching the predetermined threshold,merging previous update records with the block of data to form anupdated block of data, applying the subsequent update to the block ofdata to form a new block of data, invalidating the block of data, andwriting the new block of data to the solid state drive.
 19. The methodof claim 18, further comprising: modifying the metadata of the block ofdata to point to the new block of data.
 20. The method of claim 18,further comprising: responsive to the number of updates to the block ofdata not reaching the predetermined threshold, merging previous updaterecords with the block of data to form an updated block of data,determining a difference between the update and the updated block ofdata, compressing the difference between the update and the updatedblock of data to form a subsequent update record, storing the subsequentupdate record, and modifying metadata of the block of data to referencethe subsequent update record.
 21. The method of claim 16, furthercomprising: responsive to receiving request to read the block of data inthe solid state drive with an update option set, reading the block ofdata from the solid state drive; merging the update record with theblock of data to form an updated block of data; and returning theupdated block of data.
 22. The method of claim 16, further comprising:responsive to initiation of a garbage collection operation, selectingone or more update records for garbage collection; merging the one ormore update records with one or more blocks of data in the solid statedrive to form one or more merged blocks of data; invalidating the one ormore update records and the one or more blocks of data; reclaiming spaceof the one or more update records and the one or more blocks of data;and writing the one or more new blocks of data.